home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-09-14 | 1.4 KB | 47 lines | [TEXT/MPS ] |
- #
- # File: GetLastChange
- #
- # Contains: script to find the previous change in a window
- #
- # Usage: GetLastChange window commentFile [markCharacter]
- #
- # 0 found a change
- # 1 did not find a change
- #
- # GetLastChange extracts a change from the window into the file,
- # commentFile. The change is found by looking for the Change History
- # text. The change must be marked with the markCharacter.
- # The script leaves the entire change line selected.
- #
- # Written by: Darin Adler
- #
- # Copyright: © 1988, 1989 by Apple Computer, Inc., all rights reserved.
- #
- # Change History:
- #
- # 11/17/89 dba get rid of EndOfLine problem
- # 11/17/89 dba use UnwrapCommentText to extract a (potentially long) comment;
- # WrapCommentText will re-wrap it
- # 11/15/89 dba leave the comment file alone if there is no change history found
- # 11/13/89 dba fix bug with files that have no line header character
- # 11/9/89 dba stopped using LastChange marker; invented mark character
- #
- # To Do:
- #
-
- Set Exit 0
-
- Set Window "{1}" # get change from this file (must be open window)
-
- Set UpToComment /Change History:[ ∂t]*∂n(?«0,1»[ ∂t]*∂n)«0,1»?«0,1»∂t{3}∂t+[¬∂n∂t]+∂t+[¬∂n∂t]+∂t+/Δ
- Set Comment /≈(∂n?«0,1»∂t∂t∂t≈)*∞/
-
- Find • "{Window}"
- Find {UpToComment}:{Comment} "{Window}"
- Set FindStatus {Status}
- If {FindStatus} == 0
- UnwrapCommentText < "{Window}.§" > "{2}"
- Find §:\•\:/∂n/ "{Window}"
- End
- Exit {FindStatus}
-